package com.kt.mes.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.kt.mes.mapper.WorkPlanMapper;
import com.kt.mes.domain.WorkPlan;
import com.kt.mes.service.IWorkPlanService;

/**
 * 工作计划Service业务层处理
 * 
 * @author lzc
 * @date 2021-02-02
 */
@Service
public class WorkPlanServiceImpl implements IWorkPlanService 
{
    @Autowired
    private WorkPlanMapper workPlanMapper;

    /**
     * 查询工作计划
     * 
     * @param id 工作计划ID
     * @return 工作计划
     */
    @Override
    public WorkPlan selectWorkPlanById(Long id)
    {
        return workPlanMapper.selectWorkPlanById(id);
    }

    /**
     * 查询工作计划列表
     * 
     * @param workPlan 工作计划
     * @return 工作计划
     */
    @Override
    public List<WorkPlan> selectWorkPlanList(WorkPlan workPlan)
    {
        return workPlanMapper.selectWorkPlanList(workPlan);
    }

    /**
     * 新增工作计划
     * 
     * @param workPlan 工作计划
     * @return 结果
     */
    @Override
    public int insertWorkPlan(WorkPlan workPlan)
    {
        return workPlanMapper.insertWorkPlan(workPlan);
    }

    /**
     * 修改工作计划
     * 
     * @param workPlan 工作计划
     * @return 结果
     */
    @Override
    public int updateWorkPlan(WorkPlan workPlan)
    {
        return workPlanMapper.updateWorkPlan(workPlan);
    }

    /**
     * 批量删除工作计划
     * 
     * @param ids 需要删除的工作计划ID
     * @return 结果
     */
    @Override
    public int deleteWorkPlanByIds(Long[] ids)
    {
        return workPlanMapper.deleteWorkPlanByIds(ids);
    }

    /**
     * 删除工作计划信息
     * 
     * @param id 工作计划ID
     * @return 结果
     */
    @Override
    public int deleteWorkPlanById(Long id)
    {
        return workPlanMapper.deleteWorkPlanById(id);
    }
}
